//package com.api.syh56.shengyunhui.handler;
//
//import com.api.syh56.shengyunhui.common.CommonResult;
//import com.api.syh56.shengyunhui.common.ResultCode;
//import com.auth0.jwt.exceptions.AlgorithmMismatchException;
//import com.auth0.jwt.exceptions.SignatureVerificationException;
//import com.auth0.jwt.exceptions.TokenExpiredException;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.bind.annotation.RestController;
//
//@Configuration
//@ControllerAdvice(annotations = {RestController.class})
//@ResponseBody
//public class GlobalException {
//
//    @ExceptionHandler(SignatureVerificationException.class)
//    public CommonResult testException(SignatureVerificationException signatureVerificationException) {
//        return CommonResult.failed(ResultCode.UNAUTHORIZED);
//    }
//
//    @ExceptionHandler(TokenExpiredException.class)
//    public CommonResult testException(TokenExpiredException tokenExpiredException) {
//        return CommonResult.failed(ResultCode.UNAUTHORIZED);
//    }
//
//    @ExceptionHandler(AlgorithmMismatchException.class)
//    public CommonResult testException(AlgorithmMismatchException AlgorithmMismatchException) {
//        return CommonResult.failed(ResultCode.UNAUTHORIZED);
//    }
//
//
//}
//
